package com.example.mapper;

import com.example.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {
    @Select("SELECT * FROM user WHERE id = #{id}")
    User selectUserById(int id);

    @UpdateProvider(type = UserSqlProvider.class, method = "updateUserSql")
    int updateUser(User user);

    @DeleteProvider(type = UserSqlProvider.class, method = "deleteUsersSql")
    int deleteUsers(@Param("ids") List<Integer> ids);
}